cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
include_directories(/usr/include/vtk-5.8)
link_directories(/usr/lib)
FIND_PACKAGE( OpenCV REQUIRED )

#find_package(Eigen3 REQUIRED)
#include_directories(${EIGEN_INCLUDE_DIRS})

#find_package( g2o REQUIRED)
#include_directories(${EIGEN_INCLUDE_DIRS})

rosbuild_add_executable(dummy_kinect_node src/dummy_kinect_node.cpp)

rosbuild_add_executable(kth_data_kinect_node src/kth_data_kinect_node.cpp)
rosbuild_add_executable(slam_node src/slam_node.cpp)
target_link_libraries( slam_node g2o_cli g2o_core g2o_incremental g2o_interactive g2o_interface g2o_math_groups g2o_parser g2o_solver_cholmod g2o_solver_csparse g2o_solver_dense g2o_solver_pcg g2o_stuff g2o_types_icp g2o_types_sba g2o_types_sim3 g2o_types_slam2d g2o_types_slam3d)
TARGET_LINK_LIBRARIES( slam_node ${OpenCV_LIBS})
TARGET_LINK_LIBRARIES( slam_node vtkCommon vtkalglib vtkCharts vtkDICOMParser vtkexoIIc vtkFiltering vtkftgl vtkGenericFiltering vtkGeovis vtkGraphics vtkHybrid vtkImaging vtkInfovis vtkIO vtkIO vtkmetaio vtkParallel vtkproj4 vtkRendering vtksys vtkViews vtkVolumeRendering vtkWidgets)
